package com.javafactroy.kunlong.codefactroy.convert;


import com.javafactroy.kunlong.base.metadata.valueobj.MetadataField;
import com.javafactroy.kunlong.data.dto.MetadataColumnPropApiDto;
import com.javafactroy.kunlong.data.iface.IentityConvert;
import org.mapstruct.Mapper;
import org.mapstruct.Mapping;
import org.mapstruct.Mappings;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @author raymond.lei@163.com
 * @date 2023-11-17 22:51:30
 */

@Mapper(componentModel = "spring")
public interface MetadataColumnPropConvert extends IentityConvert<MetadataColumnPropApiDto, MetadataField> {
    MetadataColumnPropConvert INSTANCE = Mappers.getMapper(MetadataColumnPropConvert.class);

    @Mappings({
            @Mapping(source = "comment", target = "colComment"),
    })
    MetadataColumnPropApiDto toOne(MetadataField one);


    List<MetadataColumnPropApiDto> toList(List<MetadataField> list);

}
